/*
  路由配置对象的的属性如下
   path:路由的路径，用户通过地址来访问路由中的组件
   component:组件
*/
export default [
    {
        path:'/login',
        component:()=>import('@/views/Login.vue')
    },
    {
        path:'/register',
        component:()=>import('@/views/Register.vue')
    },
    {
        path:'/home',
        component:()=>import('@/views/Home.vue'),
        children:[
            {
                path:'users',
                component:()=>import('@/views/User.vue')
            },
            {
                path:'director',
                component:()=>import('@/views/Director.vue')
            },
            {
                path:'students',
                component:()=>import('@/views/Students.vue')
            },
            {
                path:'teacher',
                component:()=>import('@/views/Teacher.vue')
            },
            {
                name:'sxxq',
                path:'studentdetail',
                props:function(route){
                    return{
                        id:route.query.id
                    }
                },
                component:()=>import('@/views/StudentDetail.vue')
            },
            {
                name:'sxxg',
                path:'studentModify/:sid/:sname',
                props:true,
                component:()=>import('@/views/StudentModify.vue')
            }
        ]
    }
]